import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { databaseConfig } from '../../config/database.config';
import { User } from './entities/user.entity';
import { Tag } from '../tags/entities/tag.entity';
import { Text } from '../texts/entities/text.entity';
import { TextTag } from '../texts/entities/text-tag.entity';
import { GalleryImage } from '../gallery/entities/gallery-image.entity';

@Module({
  imports: [
    TypeOrmModule.forRoot(databaseConfig),
    TypeOrmModule.forFeature([User, Tag, Text, TextTag, GalleryImage]),
  ],
  exports: [TypeOrmModule],
})
export class DatabaseModule {}